<?php

/**
 *  Description of AppType
 *
 * @author LJ <jun.lu.726@gmail.com>
 * @copyright 2012-2013 shangbox.com
 * $Id: AppType.php 162 2012-11-09 04:04:30Z Jun.Lu.726@gmail.com $
 * @history    2012-10-16  12:07:35::  Lujun  ::  Create File
 */
class Model_Ad_AppType extends Model_AbstractDao
{

    protected $_dbName     = 'BingoMobi';
    protected $_tableName  = 'bg_ad_app_type';
    protected $_primaryKey = 'ad_id';
    protected $_nameField  = 'app_type';

    /**
     * app 分类
     * @param type $appType
     * @return boolean
     */
    public function appTypeIn($appType, $adId)
    {
        if ($appType) {
            $appTypeEnd = array();
            foreach ($appType as $val) {
                $tmpA['ad_id']    = $adId;
                $tmpA['app_type'] = $val;
                $appTypeEnd[]     = $tmpA;
            }
            return $this->batchInsert($appTypeEnd);
        }
        return false;
    }
}
